 <div id="search">
    <form action="search.php" method="POST">
      <p>
      <input type="text" name="txtsearch" id="search_" value="Tên hoặc giá sản phẩm?"   onblur="if(this.value=='') this.value='Tên hoặc giá sản phẩm?';" onfocus="if(this.value=='Tên hoặc giá sản phẩm?') this.value='';"/>
      <input type="hidden" name="search_ad" value="Tìm kiếm"/>
      </p>
    </form>
  </div>
  <table id="sanpham" border=1 style="border-collapse: collapse;border-style: outset;border-width:1px!important ;border-spacing: 2px;">
     
     <tr id="one">
        <td id="id">Id </td>
        <td id="ten">Tên anh muc </td>
        <td id="gia">Số lượng sản phẩm</td>
        <td id="option">Tùy chọn </td>
     </tr>
     <?php
      if(isset($_REQUEST[sua]) && $_REQUEST[sua]=yes){
      $id=$_REQUEST[p];
      $mysql->query("select* from category where id='{$id}'");
      $row1=$mysql->fetchRow();
     ?>
     <tr class="suatr">                
          <form action="action.php?p=<?php echo $id;?>" method="post" enctype="multipart/form-data" id="them">
             <td><input class="id_c" type="text" value="<?php echo $row1[id]?>"class="required" /></td>
             <td><input class="sua_c" type="text" name="name" value="<?php echo $row1[name]?>"class="required" /></td>
             <td><input class="sua_g" type="text" name="totalsp"value="<?php echo $row1[totalproduct]?>"class="required" /></td>
			
             <td><input type="submit" name="ediphanloai" id="sua" value="Edit"/></td>
          </form>
          
     </tr>
      <?php }?>
     <?php
     
        $mysql->query("select * from category ORDER BY id DESC");
         $i=1;
         while($row=$mysql->fetchRow()){
         if($i%2==0){
            $class="chan";
         }else{
            $class="le";
         }
         if($i<=5){
            $new="new";
         }else if($i>5){
            $new="owl";
         }
     ?> 
     
     <tr class="<?php echo $class?>">
        
        <td><?php echo $row[id]?></td>
        <td class="<?php echo $new;?>"><p><?php echo $row[name]?></p></td>
        <td><?php echo $row[totalproduct]?></td>
  
       
        <td class="option_c">
          <script>
            function confirmDelete(delUrl) {
              if (confirm("Are you sure you want to delete")) {
                document.location = delUrl;
              }
            }
            </script>
            
            
           <ul id="tuy_">
              <li><a class="edit"  href="index.php?p=<?php echo $row[id]?>&sua=yes&phanloai=true&category=<?php echo $row['name']?>">Sữa</a></li>
              <li>
              <a class="delete" href="javascript:confirmDelete('action.php?category=<?php echo $row['name']?>&action=delete_pl&p=<?php echo $row[id];?>')">Xóa</a>
              </li>
           </ul>
        </td>
     </tr>
     <?php $i++; }?>
  </table>  
                     